//
//  squareTableViewCell.m
//  FastRunDemo
//
//  Created by 苟亚明 on 16/9/20.
//  Copyright © 2016年 苟亚明. All rights reserved.
//

#import "squareTableViewCell.h"
#import <UIImageView+WebCache.h>
#import "squareList.h"
#import "MBProgressHUD+MJ.h"

@interface squareTableViewCell()
@property (weak, nonatomic) IBOutlet UIButton *btnComment;

@property (weak, nonatomic) IBOutlet UILabel *lblPlace;

@end

@implementation squareTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    self.autoresizingMask = UIViewAutoresizingNone;

}
- (IBAction)btnPicClick:(id)sender {
    
    
    UIView *bgView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, GYMScreenW, GYMScreenH)];
    bgView.backgroundColor = [UIColor clearColor];
    
    
    commentAndGood *commentAndGoodView = [commentAndGood viewFromNib];
    
    commentAndGoodView.width = 180;
    commentAndGoodView.x = CGRectGetMaxX(self.btnComment.frame) - self.btnComment.currentImage.size.width - commentAndGoodView.width - 20;
    commentAndGoodView.centerY = self.btnComment.centerY;
    commentAndGoodView.height = 35;
    
    [self.viewFooter addSubview:commentAndGoodView];
    
    self.commentAndGoodView = commentAndGoodView;
}

-(void)setTopics:(squareList *)topics{
    _topics = topics;
    
    self.lblText.text = topics.text;
    
    self.lblName.text = topics.screen_name;
    
    [self.img sd_setImageWithURL:[NSURL URLWithString:topics.profile_image] placeholderImage:[UIImage imageNamed:@"btn_girl_press"]];
    
    self.lblTime.text = topics.created_at;
    
}
@end
